<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Grid网格布局开发360图片搜索展示效果</title>
    <link rel="stylesheet" href="./css/reset.css" />
    <style>
      .container {
        width: 100%;
        margin-top: 86px;
        display: grid;
        grid-template-rows: 207px 155px 259px;
        grid-template-columns: 420px 365px 299px 118px 296px;
        gap: 3px;
        justify-content: center;
        grid-template-areas:
          "a b d d f"
          "a b e h h"
          "a c e h h";
      }

      .item:nth-child(1) {
        grid-area: a;
      }

      .item:nth-child(2) {
        grid-area: b;
      }

      .item:nth-child(3) {
        grid-area: c;
      }

      .item:nth-child(4) {
        grid-area: d;
      }

      .item:nth-child(5) {
        grid-area: e;
      }

      .item:nth-child(6) {
        grid-area: f;
        background-color: #ffc0cb;
      }

      .item:nth-child(7) {
        grid-area: h;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="item"><img src="images/grid-01.jpg" alt="" /></div>

      <div class="item"><img src="images/grid-02.jpg" alt="" /></div>

      <div class="item"><img src="images/grid-03.jpg" alt="" /></div>

      <div class="item"><img src="images/grid-04.jpg" alt="" /></div>

      <div class="item"><img src="images/grid-05.jpg" alt="" /></div>

      <div class="item"></div>

      <div class="item"><img src="images/grid-06.jpg" alt="" /></div>
    </div>
  </body>
</html>
